<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="../css/pintuer.css">
<link rel="stylesheet" href="../css/admin.css">
<script src="../js/jquery.js"></script>
<script src="../js/pintuer.js"></script>
</head>
<script type="text/javascript">
	$(function(){
		
		$(".button").click(function(){
			
			if($(".button").text().indexOf("修改")!=-1){
				//alert($(".button").text());
				$(".form-x")[0].action="${ctx }/systemUser/update";
			}
		});
	})
</script>
<body>
<div class="panel admin-panel">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o">
  </span>
  <c:if test="${empty systemUser}">
  	增加系统用内容
  </c:if>	
  <c:if test="${!empty systemUser}">
  	 修改系统内容
  </c:if>	
  </strong>
  </div>
  <div class="body-content">
    <form method="post" class="form-x" action="${ctx }/systemUser/insert">  
    <c:if test="${!empty systemUser}">
  	  <input type="hidden" value="${systemUser.id }" name="id">
    </c:if>	
      <div class="form-group">
        <div class="label">
          <label>系统用户名：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" required value="${systemUser.userName }" name="userName" data-validate="required:系统用户名,length#<=20:不能大于20位"  />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>系统密码：</label>
        </div>
        <div class="field">
          <input type="password" class="input w50" required value="${systemUser.password }" name="password" data-validate="required:系统密码,,length#<=20:不能大于20位" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit">
            <c:if test="${!empty systemUser}">
            	修改
        	</c:if>
         	 <c:if test="${empty systemUser}">
         	 	增加
         	 </c:if>
           </button>
        </div>
      </div>
    </form>
  </div>
</div>

</body></html>